package com.ys.enume.sys;

public class YsModalSelectorFieldEnum {
	// 字段类型
	public enum Type {
		TEXT("文本输入框", "t_text"),
		SELECTOR_DROPDOWN("下拉框", "t_dropdown"),
		SELECTOR_SWITCH("选择框(转换)", "t_checkbox"),
		DATE("日期", "t_date");
		public String name;
		public String value;

		private Type(String name, String value) {
			this.name = name;
			this.value = value;
		}
	}
	
	// 是否搜索
	public enum StateCondition {
		YES("查询", 1), NO("不查询", 0);
		public String name;
		public Integer value;

		private StateCondition(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
	}
	
	// 对齐方式
	public enum Align {
		CENTER("center", 0),
		LEFT("left", 1),
		RIGHT("right", 2);
		public String name;
		public Integer value;

		private Align(String name, Integer value) {
			this.name = name;
			this.value = value;
		}

		public static String getName(int value) {
			for (Align e : Align.values()) {
				if (e.value == value) {
					return e.name;
				}
			}
			return "";
		}
	}
}
